﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Demo
{
    class Program
    {
        static void Main(string[] args)
        {
            e();
        }
        static void a()
        {
            Console.WriteLine("请输入正方形的边长");
            int a = int.Parse(Console.ReadLine());
            int[,] arr = new int[a, a];
            for (int i = 0; i < a; i++)
            {
                for (int j = 0; j < a; j++)
                {
                    Console.Write("* ");
                }
                Console.WriteLine();
            }
            Console.ReadKey();
        }
        static void b()
        {
            int[,] arr = new int[9, 9];
            for (int i = 0; i < 9; i++)
            {
                for (int j = 0; j <= i; j++)
                {
                    Console.Write((i + 1) + "*" + (j + 1) + "=" + (i + 1) * (j + 1) + "\t");
                }
                Console.WriteLine();
            }
            Console.ReadKey();
        }
        static void c()
        {
            Console.WriteLine("请输入空心正方形的边长");
            int a = int.Parse(Console.ReadLine());
            string[,] arr = new string[a, a];
            for (int i = 0; i < arr.GetLength(0); i++)
            {
                for (int j = 0; j < arr.GetLength(0); j++)
                {
                    if (i >= 1 && i <= a - 2 && j >= 1 && j <= a - 2)
                    {
                        arr[i, j] = " " + " ";
                    }
                    else
                    {
                        arr[i, j] = "*" + " ";
                    }
                }
            }
            for (int i = 0; i < arr.GetLength(0); i++)
            {
                for (int j = 0; j < arr.GetLength(1); j++)
                {
                    Console.Write(arr[i, j]);
                }
                Console.WriteLine();
            }
            Console.ReadKey();
        }
        static void d()
        {
            Console.WriteLine("请输入菱形的边长");
            int a = int.Parse(Console.ReadLine());
            string[,] b = new string[a * 2, a * 2];
            for (int i = 0; i < b.GetLength(0); i++)
            {
                for (int j = 0; j < b.GetLength(1); j++)
                {
                    if (i <= a && j > a - i && j < a + i || a < i && j > i - a && j <= 3 * a - 1 - i)
                    {
                        b[i, j] = " *";
                    }
                    else
                    {
                        b[i, j] = "  ";
                    }
                }
            }
            for (int i = 0; i < b.GetLength(0); i++)
            {
                for (int j = 0; j < b.GetLength(1); j++)
                {
                    Console.Write(b[i, j]);
                }
                Console.WriteLine();
            }
            Console.ReadKey();
        }
        static void e()
        {
            string[] a = { "ab1", "cd2", "ef3", "gh4", "ij5" };
            for (int i = 0; i < a.Length; i++)
            {
                if (i % 2 == 0)
                {
                    Console.Write(a[i] + " ");
                }
            }
            Console.ReadKey();
        }
        static void f()
        {
            int[] a = { 11, 22, 33, 44, 55 };
            int[] c = new int[6];
            Console.WriteLine("输入一个数");
            int b = int.Parse(Console.ReadLine());
            for (int i = 0; i < a.Length; i++)
            {
                c[i] = a[i];
            }
            c[5] = b;
            Array.Sort(c);
            Array.Reverse(c);
            for (int i = 0; i < c.Length; i++)
            {
                Console.Write(c[i] + " ");
            }
            Console.ReadKey();
        }
    }
}
